﻿Public Class Dipendente
  Private m_Matr As Integer
  Private m_Cognome As String
  Private m_Nome As String
  Public Sub New(ByVal pMatricola As Integer, _
  ByVal pNome As String, _
  ByVal pCognome As String)
    scriviMatricola = pMatricola
    scriviCognome = pNome
    scriviNome = pCognome
  End Sub
  Private WriteOnly Property scriviMatricola() As Integer
    Set(ByVal value As Integer)
      m_Matr = value
    End Set
  End Property
  Public WriteOnly Property scriviCognome() As String
    Set(ByVal value As String)
      m_Cognome = value
    End Set
  End Property
  Public WriteOnly Property scriviNome() As String
    Set(ByVal value As String)
      m_Nome = value
    End Set
  End Property
  Public ReadOnly Property leggiMatricola() As Integer
    Get
      leggiMatricola = m_Matr
    End Get
  End Property
  Public ReadOnly Property leggiNominativo() As String
    Get
      leggiNominativo = m_Cognome & _
      " " & m_Nome
    End Get
  End Property
End Class
